-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Profile history pages #80
Conversation
Profile page is under '/account' route. It allows users to change account details and password. I moved around some files and refactored getters from register.component into forms.utils.service. Slightly changed behavior of user service update user. Did not understand what it was trying to do before, so I changed it to work. It feels like it works, but not extensively tested. Known bugs: (1) Enter does not submit edit forms. (2) Edit profile form does not inherit theme from primeng.
Branch has not merged with history service, so although history service is made, it is not being used.
Bugs fixed: Imported PInputText so editing profile page looks normal. The behaviour for 'Enter' to submit form is restored for profile page. Not Fixed: Linting.
Added interfaces for hisotry response.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some changes needed, I think for now the priority for the demo is requiring password, table sorting, and success messages.
Most of it has been fixed, except for changing how user service works.
Similar to questions page, there is a sliding window to view the last snapshot of the coding session before forfeit or submit. History table is now searchable. Profile page now properly subscribes to user$ and does not need to refresh. Known bugs: during a colab session, cannot view history page. No idea how to debug since it did not show errors or any console.log()
Fix interfaces to be more correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good but needs a few fixes
<ng-template pTemplate="caption"> | ||
<div class="flex"> | ||
<p-iconField iconPosition="left" class="ml-auto"> | ||
<p-inputIcon> | ||
<i class="pi pi-search"></i> | ||
</p-inputIcon> | ||
<input | ||
pInputText | ||
type="text" | ||
(input)="dt.filterGlobal($any($event.target).value, 'contains')" | ||
placeholder="Search keyword" /> | ||
</p-iconField> | ||
</div> | ||
</ng-template> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
search.mp4
I think we might need to ensure that the size doesn't keep changing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TBD in another branch
frontend/src/app/collaboration/submit-dialog/submit-dialog.component.ts
Outdated
Show resolved
Hide resolved
* Redefine zod schemas for better reusability * Add route to handle update to user's username and email * Add route to handle update to user's password
* Shift buttons out of profile container * Display profile details as text instead of readonly input
Remove the need for the frontend to send the final code and language
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Profile Page
Users when signed in, will be able to see their profile page. It has their Username and Email displayed. They have two options, to edit their profile information (Username and Email) or change their password.
Both changing profiles and changing passwords requires validation of old password. This is done by an additional login before a to the user service endpoint.
History Page
GET from the history service endpoint and displays matching history information in a table, sorted by time. A successful submit with status 'COMPLETED' will be marked with a ✔️, 'FORFEITED' will be a ❌ , and 'IN_PROGRESS' will be a loading spinning circle.
Maybe bug: The loading spinning circle doesnt spin on my side, even primeng spinning icon page does not work for me.
Fixes #22 #23